const obj={
    name:'唐扬',
    age:18,
    like:['篮球','足球'],
     a:undefined,
     b:null,
    // c:function(){},
    // e:Symbol(1),

}
function deepClone(obj){
    let res=Array.isArray(obj)?[]:{}
    for(key in obj){
        
        if(obj.hasOwnProperty(key)){
            if(typeof(obj[key])==='object'&&obj[key]!==null){
              res[key]= deepClone(obj[key])
            }
            else{
                res[key]=obj[key]
            }
        }

    }
    return res
}
console.log(obj);
